package jdbc;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

public class JDBCDemo4 {
    public static void main(String[] args) {
        try(
                Connection connection =DBUtil.getConnectiom();
                ) {
            Statement statement = connection.createStatement();
            String sql = "SELECT id,name,salary,title " +
                    "FROM teacher";
            System.out.println(sql);

            ResultSet rs =statement.executeQuery(sql);
            while(rs.next()){

            }
        }catch(Exception e){
            e.printStackTrace();
        }

    }
}

